{% load state_display %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../../static/personal_center/font_2369197_oqktwkt71s/iconfont.css" media="screen">
    <link rel="stylesheet" href="../../static/public_file/css/DepartmentSelection.css">
    <title>Title</title>
    <style>
        body, html {
            padding: 0px;margin: 0px;width: 100%;height: 100%;
        }
        .input-style {
            display: inline-block;width: 100%;height: 35px;font-size: 14px;border: none;background: white;
        }
        table {
            border-collapse: collapse;border-spacing: 0;
        }
        tr {
            height: 35px;
        }
        th {
            text-align: center;
        }
        td {
            padding-right: 0.5%;
        }
        .top_tag {
            border-bottom: #01AAED solid 2px;color: #01AAED;
        }
        .tab_top {
            width: 100px;height: 40px;line-height: 40px;text-align: center;display: inline-block;cursor: pointer;
        }
        .a_tag_cla{
            display: block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;height: 30px;line-height: 30px;padding-left: 1%;
        }
        .file {
            position: relative;display: inline-block;background: #D0EEFF;border: 1px solid #99D3F5;border-radius: 4px;padding: 4px 12px;overflow: hidden;color: #1E88C7;text-decoration: none;text-indent: 0;line-height: 20px;
        }
        .file input {
            position: absolute;font-size: 100px;right: 0;top: 0;opacity: 0;
        }
        .file:hover {
            background: #AADFFD;border-color: #78C3F3;color: #004974;text-decoration: none;
        }
        #loading { background: #fff url(../../static/public_file/images/jiazai.gif) no-repeat scroll center center; height: 100%; width: 100%; background-size: 10%; position: fixed; margin-top: 0px; top: 0px; left: 0px; bottom: 0px; overflow: hidden !important; right: 0px; z-index: 999999;background-color: rgba(255, 255, 255, 0.08);}
    </style>
</head>
<body>
    <div id="loading">
        <div id="loading-center">
        </div>
    </div>

    <div style="width: 100%;height: 40px;background: white;border-bottom: #cfcfcf solid 0.5px;line-height: 40px;color: black;">
        <div id="DW_tag" class="tab_top top_tag" onclick="change_mind('DW')">
            申请详情
        </div>
        <div id="LH_tag" class="tab_top" onclick="change_mind('LH')">
            附件
        </div>
        <div id="lct_tag" class="tab_top" onclick="change_mind('lct')">
            流程图
        </div>
        <button onclick="ExportCar()" style="float: right;width: 100px;height: 30px;line-height: 30px;margin-top: 5px;border-radius: 3px;border: #1E90FF solid 0.5px;background-color: #1E90FF;color: white;cursor: pointer;margin-right: 15px;">提交</button>

        <div style="width: 110px;float: right;text-align: center;height: 40px;">
            <button style="line-height: 27px;border-radius: 3px;border: #1E90FF solid 0.5px;width: 100px;height: 30px;margin-top: 5px;background: #1E90FF;color: white;"><a href="javascript:history.go(-1)" style="color: white;">返回</a></button>
        </div>
    </div>

    <div id="DW" style="width: 100%;height: 95%;background: white;overflow: auto;">
        <div id="menu_from" style="width: 100%;height: 100%;color: #2C3E50;display: inline-block;vertical-align: top;background: white;">
            <div style="width: 80%;height: auto;display: inline-block;vertical-align: center;margin-left: 10%;">
                <div style="width: 100%;">
                    <table style="width: 100%;margin-top: 20px;">
                        <tr style="width: 100%;">
                            <td colspan="4" style="height: 45px;text-align: center;font-size: 23px;border: #cfcfcf solid 0.5px;">付款流程申请</td>
                        </tr>
                        <tr>
                            <td colspan="4"
                                style="border: #cfcfcf solid 0.5px;width: 95%;margin-left: 2.5%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #dfdfdf;">
                                基本信息
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;text-align: right;height: 37px;line-height: 37px;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">申请人</p>
                            </td>
                            <td id="applicat"
                                style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">
                                {{ obj.apply_user.real_name }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">所属科室</p>
                            </td>
                            <td id="company" style="width: 35%;height: 37px;line-height: 37px;padding-left: 1%;border: #cfcfcf solid 0.5px;">{{ obj.company.name }}</td>
                        </tr>

                        <tr>
                            <td colspan="4" style="width: 95%;margin-left: 2.5%;height: 40px;padding-left: 0.5%;line-height: 40px;background: #dfdfdf;border-left: #cfcfcf solid 0.5px;border-right: #cfcfcf solid 0.5px;">申请详情</td>
                        </tr>

                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">付款事由</p>
                            </td>
                            <td id="pay_reason" style="width: 35%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;padding-left: 1%;outline: none;" contenteditable="{{ is_edit }}">
                                {{ obj.title }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">经费来源</p>
                            </td>
                            <td style="width: 35%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: left;padding-left: 1%;outline: none;">
                                {% if is_edit == 'true' %}
                                    <select name="" id="source_funds" style="width: 100%;height: 100%;border: none;outline: none;">
                                        <option value="1" {% if obj.source == '1' %}selected{% endif %}>自有经费</option>
                                        <option value="2" {% if obj.source == '2' %}selected{% endif %}>学科经费</option>
                                        <option value="3" {% if obj.source == '3' %}selected{% endif %}>科研经费</option>
                                        <option value="4" {% if obj.source == '4' %}selected{% endif %}>财政拨款</option>
                                        <option value="5" {% if obj.source == '5' %}selected{% endif %}>贴息贷款</option>
                                        <option value="6" {% if obj.source == '6' %}selected{% endif %}>专项债券</option>
                                        <option value="7" {% if obj.source == '7' %}selected{% endif %}>工会经费</option>
                                    </select>
                                {% else %}
                                    {% if obj.source == '1' %}自有经费{% elif obj.source == '2' %}学科经费{% elif obj.source == '3' %}科研经费{% elif obj.source == '4' %}财政拨款{% elif obj.source == '5' %}贴息贷款{% elif obj.source == '6' %}专项债券{% elif obj.source == '7' %}工会经费{% else %}{% endif %}
                                {% endif %}
                            </td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="border-right: #cfcfcf solid 0.5px;border-left: #cfcfcf solid 0.5px;border-bottom: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;width: 15%;"><p style="width: 100px;float: right;text-align-last: justify;">收款单位</p></td>
                            <td style="text-align: left;padding-left: 1%;width: 35%;outline: none;" id="payee" contenteditable="{{ is_edit }}">{{ obj.Payee }}</td>
                            <td style="border-right: #cfcfcf solid 0.5px;border-left: #cfcfcf solid 0.5px;border-bottom: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;width: 15%;"><p style="width: 100px;float: right;text-align-last: justify;">收款账号</p></td>
                            <td style="border-right: #cfcfcf solid 0.5px; text-align: left;padding-left: 1%;width: 35%;outline: none;" id="payee_account" contenteditable="{{ is_edit }}">{{ obj.receiving_account }}</td>
                        </tr>
                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">总金额</p>
                            </td>
                            <td id="total_money" style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;padding-left: 1%;outline: none;" contenteditable="{{ is_edit }}" onblur="change_daxie()">
                                {{ obj.total_money }}
                            </td>
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">大写</p>
                            </td>
                            <td style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;padding-left: 1%;" id="daxie">{{ obj.daxie }}
                            </td>
                        </tr>

                        <tr style="width: 100%;">
                            <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">开户行</p>
                            </td>
                            <td id="BankDeposit" style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;padding-left: 1%;outline: none;" contenteditable="{{ is_edit }}">{{ obj.opening_bank }}
                            </td>
                            <td style="border-right: #cfcfcf solid 0.5px;border-left: #cfcfcf solid 0.5px;border-bottom: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;width: 15%;"><p style="width: 100px;float: right;text-align-last: justify;">付款类型</p></td>
                            <td style="border-right: #cfcfcf solid 0.5px; text-align: left;padding-left: 1%;width: 35%;outline: none;">
                                {% if is_edit == 'true' %}
                                    <select name="" id="pay_type_select" style="width: 100%;height: 100%;border: none;outline: none;" onchange="change_pay_type()">
                                        <option value="0">请选择付款类型</option>
                                        <option value="1" {% if obj.pay_type == '1' %}selected{% endif %}>合同付款</option>
                                        <option value="2" {% if obj.pay_type == '2' %}selected{% endif %}>固定资产/维修维保付款</option>
                                        <option value="3" {% if obj.pay_type == '3' %}selected{% endif %}>材料付款</option>
                                        <option value="4" {% if obj.pay_type == '4' %}selected{% endif %}>餐补付款</option>
                                        <option value="5" {% if obj.pay_type == '5' %}selected{% endif %}>学科经费</option>
                                        <option value="6" {% if obj.pay_type == '6' %}selected{% endif %}>科研经费</option>
                                        <option value="7" {% if obj.pay_type == '7' %}selected{% endif %}>一般付款</option>
                                        <option value="8" {% if obj.pay_type == '8' %}selected{% endif %}>工会经费</option>
                                    </select>
                                {% else %}
                                    {% if obj.pay_type == '1' %}
                                        合同付款
                                    {% elif obj.pay_type == '2' %}
                                        固定资产/维修维保付款
                                    {% elif obj.pay_type == '3' %}
                                        材料付款
                                    {% elif obj.pay_type == '4' %}
                                        餐补付款
                                    {% elif obj.pay_type == '5' %}
                                        学科经费
                                    {% elif obj.pay_type == '6' %}
                                        科研经费
                                    {% elif obj.pay_type == '7' %}
                                        一般付款
                                    {% else %}
                                        工会经费
                                    {% endif %}
                                {% endif %}
                            </td>
                        </tr>
                        {% if obj.beforehand_parent or obj.reception_parent %}
                            <tr style="width: 100%;">
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;"><p style="width: 100px;float: right;text-align-last: justify;">接待事前审批</p></td>
                                {% if obj.beforehand_parent %}
                                    <td id="PreReception" style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;" data-value="{{ obj.beforehand_parent.id }}"><a href="/new-flow-logic/official_business_reception_detail.html?id={{ obj.beforehand_parent.id }}">{{ obj.beforehand_parent.reception_reason }}</a></td>
                                {% else %}
                                    <td id="PreReception" style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;"></td>
                                {% endif %}
                                <td style="border-right: #cfcfcf solid 0.5px;border-left: #cfcfcf solid 0.5px;border-bottom: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;width: 15%;"><p style="width: 100px;float: right;text-align-last: justify;">接待清单</p></td>
                                {% if obj.reception_parent %}
                                    <td id="ReceptionChecklist" style="border: #cfcfcf solid 0.5px; text-align: left;padding-left: 0.5%;width: 35%;outline: none;height: 37px;line-height: 37px;" data-value="{{ obj.reception_parent.id }}"><a href="/new-flow-logic/reception_checklist_detail.html?id={{ obj.reception_parent.id }}">{{ obj.reception_parent.official_interaction }}</a></td>
                                {% else %}
                                    <td id="ReceptionChecklist" style="border: #cfcfcf solid 0.5px; text-align: left;padding-left: 0.5%;width: 35%;outline: none;height: 37px;line-height: 37px;"></td>
                                {% endif %}

                            </tr>
                        {% endif %}

                        {% if bgs_flag == 'true' %}
                            {% if is_edit == 'true' %}
                                <tr>
                                    <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                        <p style="width: 100px;float: right;text-align-last: justify;">备注</p>
                                    </td>
                                    <td id="rask" style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;" contenteditable="true">{{ obj.node }}</td>
                                    <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                        <p style="width: 100px;float: right;text-align-last: justify;">分管领导</p>
                                    </td>
                                    <td style="width: 35%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;">
                                        <select name="" id="fenguan_leader" style="width: 100%;height: 100%;border: none;outline: none;">
                                            <option value="0">请选择分管领导</option>
                                            {% for leader in leaders_obj %}
                                                <option value="{{ leader.id }}">{{ leader.real_name }}</option>
                                            {% endfor %}
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%;border-right: #cfcfcf solid 0.5px;border-left: #cfcfcf solid 0.5px;border-bottom: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                        <p style="width: 100px;float: right;text-align-last: justify;">承办科室</p>
                                    </td>
                                    <td id="demand_office" colspan="3" onclick="show_office_model()" style="width: 85%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;"></td>
                                </tr>
                            {% else %}
                                <tr>
                                    <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                        <p style="width: 100px;float: right;text-align-last: justify;">备注</p>
                                    </td>
                                    <td id="rask" colspan="3" style="width: 85%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;" contenteditable="{{ is_edit }}">{{ obj.node }}</td>
                                </tr>
                            {% endif %}
                        {% else %}
                            <tr>
                                <td style="width: 15%;border: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                    <p style="width: 100px;float: right;text-align-last: justify;">备注</p>
                                </td>
                                <td id="rask" colspan="3" style="width: 85%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;" contenteditable="{{ is_edit }}">{{ obj.node }}</td>
                            </tr>
                        {% endif %}

                        <tr id="expense_category_tr" {% if obj.expense_category %}style="display: table-row;"{% else %}style="display: none;"{% endif %}>
                            <td style="width: 15%;border-right: #cfcfcf solid 0.5px;border-left: #cfcfcf solid 0.5px;border-bottom: #cfcfcf solid 0.5px;height: 37px;line-height: 37px;text-align: right;padding-right: 1%;">
                                <p style="width: 100px;float: right;text-align-last: justify;">费用类别</p>
                            </td>
                            <td colspan="3" style="width: 85%;height: 37px;line-height: 37px;border: #cfcfcf solid 0.5px;outline: none;padding-left: 0.5%;">
                                {% if is_edit == 'true' %}
                                    <select id="expense_category" style="width: 100%;height: 100%;outline: none;border: none;">
                                        <option value="0">请选择费用类别</option>
                                        <option value="1" {% if obj.expense_category == '1' %}selected{% endif %}>专利申请费</option>
                                        <option value="2" {% if obj.expense_category == '2' %}selected{% endif %}>外出参加学术会议</option>
                                        <option value="3" {% if obj.expense_category == '3' %}selected{% endif %}>外出参加技能培训</option>
                                        <option value="4" {% if obj.expense_category == '4' %}selected{% endif %}>外出进修学习</option>
                                        <option value="5" {% if obj.expense_category == '5' %}selected{% endif %}>教学设备</option>
                                        <option value="6" {% if obj.expense_category == '6' %}selected{% endif %}>教授劳务费</option>
                                        <option value="7" {% if obj.expense_category == '7' %}selected{% endif %}>教授接待费</option>
                                        <option value="8" {% if obj.expense_category == '8' %}selected{% endif %}>版面费</option>
                                        <option value="9" {% if obj.expense_category == '9' %}selected{% endif %}>其他</option>
                                    </select>
                                {% else %}
                                    {% if obj.expense_category == '1' %}
                                        专利申请费
                                    {% elif obj.expense_category == '2' %}
                                        外出参加学术会议
                                    {% elif obj.expense_category == '3' %}
                                        外出参加技能培训
                                    {% elif obj.expense_category == '4' %}
                                        外出进修学习
                                    {% elif obj.expense_category == '5' %}
                                        教学设备
                                    {% elif obj.expense_category == '6' %}
                                        教授劳务费
                                    {% elif obj.expense_category == '7' %}
                                        教授接待费
                                    {% elif obj.expense_category == '8' %}
                                        版面费
                                    {% else %}
                                        其他
                                    {% endif %}
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                </div>
                {% if is_edit == 'true' %}
                    <div style="width: 100%;height: 40px;line-height: 40px;background-color: #F5F5F5;color: #1E90FF;padding-left: 1%;border: #cccccc solid 1px;border-top: none;border-bottom: none;padding-right: 1%;">
                        上传附件
                        <a href="javascript:;" class="file" style="vertical-align: top;margin-top: 5px;float: right;">
                            上传文件
                            <input type="file" name="party_main_body" id="party_main_body" onchange="upload_accessory('file1', 'party_main', 'party_main_body')">
                        </a>
                    </div>
                    <table style="width: 100%;">
                        <thead>
                        <tr>
                            <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">序号</td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                文件名称
                            </td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                文件大小
                            </td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                上传时间
                            </td>
                            <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                上传人员
                            </td>
                            <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;">
                                操作
                            </td>
                        </tr>
                        </thead>
                        <tbody style="overflow: auto;" id="party_main">
                        {% for record in file_list %}
                            <tr>
                                <td style="width: 5%;border: #cccccc solid 1px;text-align: center;">{{ forloop.counter }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_name }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.file_size }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.upload_time }}</td>
                                <td style="width: 20%;border: #cccccc solid 1px;border-left: none;text-align: center;">{{ record.uploader }}</td>
                                <td style="width: 15%;border: #cccccc solid 1px;border-left: none;text-align: center;"><a target='_blank' href="{{ record.file_path }}">查看</a> | <a style="color: red;" href='#' onclick='RemoveTr(this, "party_main", {{ record.id }})' >删除</a></td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                {% endif %}

                <table style="width: 100%;">
                    <tr>
                        <td colspan="4"
                            style="width: 90%;height: 40px;margin-left: 5%;line-height: 40px;background-color: #F5F5F5;padding-left: 1%;border: #cccccc solid 0.5px;padding-right: 1%;">
                            审批详情
                        </td>
                    </tr>
                    {% if 'one' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                科室负责人
                            </td>
                            <td style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'one' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'zero' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4.5px;">
                                承办科室
                            </td>
                            <td style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'zero' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'six' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                科教科审核
                            </td>
                            <td style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'six' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'two' in audit_dic %}
                        <tr id="fgld_tr" style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4.5px;">
                                分管领导
                            </td>
                            <td id="zhuren"
                                style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'two' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'three' in audit_dic %}
                        <tr id="ybzr_tr" style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;">
                                财&nbsp;&nbsp;&nbsp;务&nbsp;&nbsp;&nbsp;科
                            </td>
                            <td id="fenguan"
                                style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'three' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'four' in audit_dic %}
                        <tr style="width: 100%;">
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4.5px;">
                                总会计师
                            </td>
                            <td id="bangongshi"
                                style="width: 85%;height: 150px;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'four' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}

                    {% if 'five' in flow_dict %}
                        <tr style="width: 100%;" >
                            <td style="width: 15%;height: 150px;border: #cccccc solid 1px;text-align: right;padding-right: 1%;border-top: none;letter-spacing: 4.5px;">
                                财务支付
                            </td>
                            <td id=""
                                style="width: 85%;height: auto;border: #cccccc solid 1px;border-left: none;border-top: none;outline: none;">
                                {% for k,v in audit_dic.items %}
                                    {% if k == 'five' %}
                                        {% for item in v %}
                                            {% if item.state != 'unaudit' %}
                                                <div style="width: 100%;line-height: 20px;position: relative;">
                                                    <span>{{ item.state_display }}</span>
                                                    <span style="margin-left: 3%">{{ item.audit_note }}</span>
                                                </div>
                                                <div>
                                                    {% if item.signature_picture %}
                                                        <img src="{{ item.signature_picture }}" alt="" style="width: 150px; height: 60px;">
                                                    {% else %}
                                                        {{ item.audit_user }}
                                                    {% endif %}
                                                </div>
                                                <div style="text-align: right;color: #0b0b0b;">{{ item.audit_time }}</div>
                                            {% endif %}
                                        {% endfor %}
                                    {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}
                </table>
            </div>
        </div>
    </div>

    <div id="LH" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="display: inline-block;width: 20%;vertical-align: top;height: 99%">
            <div style="width: 100%;height: 40px;background: #c8cbcf;padding-left: 2%;line-height: 40px;color: #0c6fd9;">
                附件
            </div>
            <div id="yt_zhengwen" style="width: 100%;">
                {% for item in file_list %}
                    <div><a href="#" class="a_tag_cla" onclick="chage_yulan(this, '{{ item.file_path }}')">{{ item.file_name }}</a></div>
                {% endfor %}
            </div>
        </div>
        <div style="display: inline-block;width: 78%;vertical-align: top;height: 99%;text-align: center;" id="fujian">
            {% if 'jpg' in file_path or 'JPG' in file_path or 'JPEG' in file_path or 'jpeg' in file_path or 'PNG' in file_path or 'png' in file_path %}
                <img src="{{ file_path }}" alt="" style="width: 800px;height: 100%;">
            {% else %}
                <embed id="embed_file" src="{{ file_path }}" type="application/pdf" style="width: 100%;height: 100%;">
            {% endif %}
        </div>
    </div>

    <div id="lct" style="width: 100%;height: 94%;background: white;display: none;">
        <div style="width: 100%;height: 40%;text-align: center;margin: 20% auto;">
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    ({{ obj.apply_user.real_name }})<br>
                    发起人
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    start
                </div>
            </div>

            {% if 'one' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'one' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                科室负责人
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'zero' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'zero' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                需求科室
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'six' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'six' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                科教科审核
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'two' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'two' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                分管领导
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'three' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'three' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                财务科长
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'four' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'four' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                总会计师
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            {% if 'five' in flow_dict %}
                {% for k,v in flow_dict.items %}
                    {% if k == 'five' %}
                        <div style="display: inline-block;border: {% if v.apply == 'true' %} #0d8ddb {% else %} #cfcfcf {% endif %} solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
                        <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                            <div style="text-align: center;{% if v.apply == 'true' %} color: #0d8ddb; {% endif %}">
                                ({{ v.apply_people }})<br>
                                财务支付
                            </div>
                            <div style="width: 25px;height: 25px;border-radius: 50%;{% if v.apply == 'true' %} background: #0d8ddb; {% else %} background: #cfcfcf; {% endif %}color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                                {{ v.sear }}
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endif %}

            <div style="display: inline-block;border: #0d8ddb solid 1px;width: 120px;vertical-align: bottom;margin-bottom: 12px;"></div>
            <div style="display: inline-block;vertical-align: top;cursor: pointer;text-align: center;">
                <div style="text-align: center;color: #0d8ddb;">
                    <span style="visibility: hidden;">({{ obj.apply_user.real_name }})</span><br>
                    结束
                </div>
                <div style="width: 50px;height: 25px;border-radius: 3px;background: #0d8ddb;color: white;text-align: center;display: inline-block;font-size: 12px;line-height: 25px;">
                    ending
                </div>
            </div>
        </div>
    </div>

    <script src="../../static/system_setup/creat_from/js/jquery-1.10.2.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
        };

        function chage_yulan(this_, file_path) {
            var fujian = document.getElementById("fujian");
            var file_index = file_path.lastIndexOf(".")
            var ext = file_path.substring(file_index+1)
            var arr=['jpg', 'JPG', "JPEG", "jpeg", "PNG", "png"];
            var ext_index=arr.indexOf(ext);
            if (ext_index === -1){
                fujian.innerHTML = '<embed id="embed_file" src="'+file_path+'" type="" style="width: 100%;height: 100%;">'
            }else {
                fujian.innerHTML = '<img src="' + file_path + '" alt="application/pdf" style="width: 800px;height: 100%;">'
            }

            var a_tag_list = document.getElementsByClassName("a_tag_cla");
            for (var i = 0;i<a_tag_list.length; i++){
                a_tag_list[i].style.background='';
            }
            this_.style.background='#cfcfcf';
        }

        function change_mind(ele_id) {
            if (ele_id === "DW") {
                document.getElementById("DW").style.display = "inline-block";
                document.getElementById("DW_tag").className = "tab_top top_tag";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            } else if (ele_id === "LH") {
                document.getElementById("LH").style.display = "inline-block";
                document.getElementById("LH_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("lct_tag").className = "tab_top";
                document.getElementById("lct").style.display = "none";
            }else {
                document.getElementById("lct").style.display = "inline-block";
                document.getElementById("lct_tag").className = "tab_top top_tag";
                document.getElementById("DW_tag").className = "tab_top";
                document.getElementById("DW").style.display = "none";
                document.getElementById("LH_tag").className = "tab_top";
                document.getElementById("LH").style.display = "none";
            }
        }
    </script>
</body>
</html>